'.__('You are currently Logged on as member').': '.$_SESSION['m_name'].' ('.$_SESSION['m_email'].') '.__('LOGOUT').''; } // start the output buffering for main content ob_start(); require LIB.'contents/common.inc.php'; if (isset($_GET['p'])) { $path = utility::filterData('p', 'get', false, true, true); // some extra checking $path = preg_replace('@^(http|https|ftp|sftp|file|smb):@i', '', $path); $path = preg_replace('@\/@i','',$path); // check if the file exists if (file_exists(LIB.'contents/'.$path.'.inc.php')) { include LIB.'contents/'.$path.'.inc.php'; if ($path != 'show_detail') { $metadata = ''; } } else { // get content data from database $metadata = ''; include LIB.'content.inc.php'; $content = new Content(); $content_data = $content->get($dbs, $path); if ($content_data) { $page_title = $content_data['Title']; echo $content_data['Content']; unset($content_data); } else { header ("location:index.php"); } } } else { $metadata = ''; // homepage header info if (!isset($_GET['p'])) { if ((!isset($_GET['keywords'])) AND (!isset($_GET['page'])) AND (!isset($_GET['title'])) AND (!isset($_GET['author'])) AND (!isset($_GET['subject'])) AND (!isset($_GET['location']))) { // get content data from database include LIB.'content.inc.php'; $content = new Content(); $content_data = $content->get($dbs, 'headerinfo'); if ($content_data) { //$header_info .= '
'.$content_data['Content'].'
'; unset($content_data); } } } include LIB.'contents/default.inc.php'; } // main content grab $main_content = ob_get_clean(); // template output require $sysconf['template']['dir'].'/'.$sysconf['template']['theme'].'/index_template.inc.php';